---
description: "Reference for Nitric's v0 Node.js library - Get a reference to a document in the collection."
---

# Node.js - collection.doc()

Get a reference to a document in the collection.

```javascript
import { collection } from '@nitric/sdk'

const profiles = collection('profiles').for('reading', 'writing')

const drakesProfile = profiles.doc('Drake Mallard')
```

## Parameters

<Properties>
  <Property name="key" required type="string">
    The key of the document to reference.
  </Property>
</Properties>

### See also

- [doc.get()](./collection-doc-get)
- [doc.set()](./collection-doc-set)
- [doc.delete()](./collection-doc-delete)
- [doc.collection()](./collection-doc-collection)
